<?php 
require_once('../../include/top.php');

 
$name=$_POST['name'];
$url=$_POST['url'];
$content=$_POST['content'];
$date=date('Y-m-j H:i:s');   

$pdo = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PWD);

$sql = "INSERT INTO shout(name, url, content, date) VALUES( :name, :url, :content, :date)";
			
$req = $pdo->prepare($sql);

$req->bindParam(':name', $name);
$req->bindParam(':url', $url);
$req->bindParam(':content', $content);
$req->bindParam(':date', $date);
$req->execute();


?>

